home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / develop™ Technical Journal / develop Issue 26 code / Truffles-Display Mgr.sit / Truffles - Display Mgr. / Sprocket / ExperimentalStuff / Exceptions.h < prev    next >
MacBinary  |  1995-11-16  |  4.8 KB  |  [TEXT/MMCC]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Wed Nov 15 20:20:43 1995, modified Wed Nov 15 20:20:43 1995, creator 'MMCC', type ASCII, 4153 bytes "Exceptions.h" , at 0x10b9 456 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MMCC]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0c 45 78 63 65 70 74 | 69 6f 6e 73 2e 68 00 00 |..Except|ions.h..|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 4d 43 | 43 01 00 00 00 00 00 00 |.TEXTMMC|C.......|
|00000050| 00 00 00 00 00 10 39 00 | 00 01 c8 ac d0 42 6b ac |......9.|.....Bk.|
|00000060| d0 42 6b 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.Bk.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 1e 52 00 00 |........|.....R..|
|00000080| 2f 2a 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |/*======|========|
|00000090| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000000a0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000000b0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 0d 09 |========|======..|
|000000c0| 45 78 63 65 70 74 69 6f | 6e 73 2e 68 0d 09 0d 09 |Exceptio|ns.h....|
|000000d0| 67 72 65 67 67 6f 72 40 | 61 70 70 6c 65 2e 63 6f |greggor@|apple.co|
|000000e0| 6d 0d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |m.======|========|
|000000f0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000100| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000110| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 2a 2f |========|======*/|
|00000120| 0d 23 69 66 6e 64 65 66 | 20 5f 5f 45 58 43 45 50 |.#ifndef| __EXCEP|
|00000130| 54 49 4f 4e 53 5f 5f 0d | 23 64 65 66 69 6e 65 20 |TIONS__.|#define |
|00000140| 5f 5f 45 58 43 45 50 54 | 49 4f 4e 53 5f 5f 0d 23 |__EXCEPT|IONS__.#|
|00000150| 64 65 66 69 6e 65 20 45 | 78 63 65 70 74 69 6f 6e |define E|xception|
|00000160| 73 5f 68 0d 0d 23 69 66 | 6e 64 65 66 20 5f 5f 52 |s_h..#if|ndef __R|
|00000170| 45 53 4f 55 52 43 45 53 | 5f 5f 0d 23 69 6e 63 6c |ESOURCES|__.#incl|
|00000180| 75 64 65 20 3c 52 65 73 | 6f 75 72 63 65 73 2e 68 |ude <Res|ources.h|
|00000190| 3e 0d 23 65 6e 64 69 66 | 0d 0d 23 69 66 6e 64 65 |>.#endif|..#ifnde|
|000001a0| 66 20 5f 5f 4d 45 4d 4f | 52 59 5f 5f 0d 23 69 6e |f __MEMO|RY__.#in|
|000001b0| 63 6c 75 64 65 20 3c 4d | 65 6d 6f 72 79 2e 68 3e |clude <M|emory.h>|
|000001c0| 0d 23 65 6e 64 69 66 0d | 0d 23 69 66 20 64 65 66 |.#endif.|.#if def|
|000001d0| 69 6e 65 64 28 5f 5f 4d | 57 45 52 4b 53 5f 5f 29 |ined(__M|WERKS__)|
|000001e0| 0d 23 64 65 66 69 6e 65 | 20 52 45 41 4c 5f 45 58 |.#define| REAL_EX|
|000001f0| 43 45 50 54 49 4f 4e 53 | 09 2f 2f 20 44 65 66 69 |CEPTIONS|.// Defi|
|00000200| 65 6e 64 20 66 6f 72 20 | 63 6f 6d 70 69 6c 65 72 |end for |compiler|
|00000210| 73 20 74 68 61 74 20 64 | 6f 20 27 72 65 61 6c 27 |s that d|o 'real'|
|00000220| 20 65 78 63 65 70 74 69 | 6f 6e 73 0d 23 65 6e 64 | excepti|ons.#end|
|00000230| 69 66 0d 0d 2f 2f 0d 2f | 2f 20 4f 75 72 20 65 72 |if..//./|/ Our er|
|00000240| 72 6f 72 20 63 6f 64 65 | 73 0d 2f 2f 0d 63 6f 6e |ror code|s.//.con|
|00000250| 73 74 20 4f 53 45 72 72 | 20 65 50 6f 69 6e 74 65 |st OSErr| ePointe|
|00000260| 72 4e 69 6c 09 09 09 09 | 3d 20 2d 31 31 30 3b 0d |rNil....|= -110;.|
|00000270| 63 6f 6e 73 74 20 4f 53 | 45 72 72 20 65 47 65 6e |const OS|Err eGen|
|00000280| 65 72 61 6c 45 72 72 09 | 09 09 09 3d 20 2d 31 3b |eralErr.|...= -1;|
|00000290| 0d 63 6f 6e 73 74 20 4f | 53 45 72 72 20 65 41 73 |.const O|SErr eAs|
|000002a0| 73 65 72 74 69 6f 6e 46 | 61 69 6c 75 72 65 09 09 |sertionF|ailure..|
|000002b0| 3d 20 2d 33 30 30 30 30 | 3b 0d 63 6f 6e 73 74 20 |= -30000|;.const |
|000002c0| 4f 53 45 72 72 20 65 52 | 65 71 75 69 72 65 6d 65 |OSErr eR|equireme|
|000002d0| 6e 74 4e 6f 74 4d 65 74 | 09 09 3d 20 2d 33 30 30 |ntNotMet|..= -300|
|000002e0| 30 31 3b 0d 63 6f 6e 73 | 74 20 4f 53 45 72 72 20 |01;.cons|t OSErr |
|000002f0| 65 56 61 6c 75 65 4f 75 | 74 4f 66 52 61 6e 67 65 |eValueOu|tOfRange|
|00000300| 09 09 3d 20 2d 33 30 30 | 30 32 3b 0d 63 6f 6e 73 |..= -300|02;.cons|
|00000310| 74 20 4f 53 45 72 72 20 | 65 49 6e 64 65 78 4f 75 |t OSErr |eIndexOu|
|00000320| 74 4f 66 52 61 6e 67 65 | 09 09 3d 20 2d 33 30 30 |tOfRange|..= -300|
|00000330| 30 33 3b 0d 63 6f 6e 73 | 74 20 4f 53 45 72 72 20 |03;.cons|t OSErr |
|00000340| 65 4c 69 6e 6b 73 43 6f | 72 72 75 70 74 09 09 09 |eLinksCo|rrupt...|
|00000350| 3d 20 2d 33 30 30 30 34 | 3b 0d 63 6f 6e 73 74 20 |= -30004|;.const |
|00000360| 4f 53 45 72 72 20 65 44 | 61 74 61 43 6f 72 72 75 |OSErr eD|ataCorru|
|00000370| 70 74 09 09 09 3d 20 2d | 33 30 30 30 35 3b 0d 63 |pt...= -|30005;.c|
|00000380| 6f 6e 73 74 20 4f 53 45 | 72 72 20 65 57 72 6f 6e |onst OSE|rr eWron|
|00000390| 67 44 61 74 61 54 79 70 | 65 09 09 09 3d 20 2d 33 |gDataTyp|e...= -3|
|000003a0| 30 30 30 36 3b 0d 0d 2f | 2f 0d 2f 2f 20 43 6f 6e |0006;../|/.// Con|
|000003b0| 73 74 61 6e 74 73 20 75 | 73 65 64 20 62 79 20 74 |stants u|sed by t|
|000003c0| 68 65 20 66 61 69 6c 75 | 72 65 20 63 6c 61 73 73 |he failu|re class|
|000003d0| 0d 2f 2f 0d 63 6f 6e 73 | 74 20 6c 6f 6e 67 20 6b |.//.cons|t long k|
|000003e0| 4d 61 67 69 63 46 61 69 | 6c 49 44 09 09 09 09 3d |MagicFai|lID....=|
|000003f0| 20 27 66 61 69 6c 27 3b | 0d 0d 63 6f 6e 73 74 20 | 'fail';|..const |
|00000400| 6c 6f 6e 67 20 6b 54 72 | 79 46 72 61 6d 65 4f 6e |long kTr|yFrameOn|
|00000410| 46 61 69 6c 75 72 65 53 | 74 61 63 6b 09 3d 20 30 |FailureS|tack.= 0|
|00000420| 78 30 30 30 31 3b 0d 63 | 6f 6e 73 74 20 6c 6f 6e |x0001;.c|onst lon|
|00000430| 67 20 6b 45 78 63 65 70 | 74 69 6f 6e 54 68 72 6f |g kExcep|tionThro|
|00000440| 77 6e 09 09 09 3d 20 30 | 78 30 30 30 32 3b 0d 63 |wn...= 0|x0002;.c|
|00000450| 6f 6e 73 74 20 6c 6f 6e | 67 20 6b 54 72 79 49 6e |onst lon|g kTryIn|
|00000460| 50 72 6f 67 72 65 73 73 | 09 09 09 3d 20 30 78 30 |Progress|...= 0x0|
|00000470| 30 30 34 3b 0d 63 6f 6e | 73 74 20 6c 6f 6e 67 20 |004;.con|st long |
|00000480| 6b 54 72 79 53 75 63 63 | 65 65 64 65 64 09 09 09 |kTrySucc|eeded...|
|00000490| 3d 20 30 78 30 30 30 38 | 3b 0d 63 6f 6e 73 74 20 |= 0x0008|;.const |
|000004a0| 6c 6f 6e 67 20 6b 52 65 | 73 69 67 6e 61 6c 69 6e |long kRe|signalin|
|000004b0| 67 46 61 69 6c 75 72 65 | 09 09 3d 20 30 78 30 30 |gFailure|..= 0x00|
|000004c0| 31 30 3b 0d 63 6f 6e 73 | 74 20 6c 6f 6e 67 20 6b |10;.cons|t long k|
|000004d0| 54 72 79 42 6c 6f 63 6b | 48 61 73 42 65 65 6e 53 |TryBlock|HasBeenS|
|000004e0| 65 74 75 70 09 3d 20 30 | 78 30 31 30 30 3b 0d 0d |etup.= 0|x0100;..|
|000004f0| 23 69 66 6e 64 65 66 20 | 52 45 41 4c 5f 45 58 43 |#ifndef |REAL_EXC|
|00000500| 45 50 54 49 4f 4e 53 0d | 0d 23 69 6e 63 6c 75 64 |EPTIONS.|.#includ|
|00000510| 65 20 3c 73 65 74 6a 6d | 70 2e 68 3e 0d 0d 2f 2f |e <setjm|p.h>..//|
|00000520| 0d 2f 2f 20 46 61 69 6c | 75 72 65 20 63 6c 61 73 |.// Fail|ure clas|
|00000530| 73 0d 2f 2f 0d 63 6c 61 | 73 73 20 54 45 78 63 65 |s.//.cla|ss TExce|
|00000540| 70 74 69 6f 6e 0d 7b 0d | 70 75 62 6c 69 63 3a 0d |ption.{.|public:.|
|00000550| 09 54 45 78 63 65 70 74 | 69 6f 6e 2a 09 09 09 09 |.TExcept|ion*....|
|00000560| 66 4e 65 78 74 3b 0d 09 | 4f 53 45 72 72 09 09 09 |fNext;..|OSErr...|
|00000570| 09 09 66 45 72 72 6f 72 | 3b 0d 09 6c 6f 6e 67 09 |..fError|;..long.|
|00000580| 09 09 09 09 66 46 6c 61 | 67 73 3b 0d 09 6a 6d 70 |....fFla|gs;..jmp|
|00000590| 5f 62 75 66 09 09 09 09 | 09 66 45 6e 76 3b 0d 09 |_buf....|.fEnv;..|
|000005a0| 6c 6f 6e 67 09 09 09 09 | 09 66 4d 61 67 69 63 46 |long....|.fMagicF|
|000005b0| 61 69 6c 49 44 3b 0d 0d | 09 09 09 09 09 09 09 54 |ailID;..|.......T|
|000005c0| 45 78 63 65 70 74 69 6f | 6e 28 29 20 3a 20 66 4e |Exceptio|n() : fN|
|000005d0| 65 78 74 28 6e 69 6c 29 | 2c 20 66 45 72 72 6f 72 |ext(nil)|, fError|
|000005e0| 28 6e 6f 45 72 72 29 2c | 20 66 46 6c 61 67 73 28 |(noErr),| fFlags(|
|000005f0| 30 29 2c 20 66 4d 61 67 | 69 63 46 61 69 6c 49 44 |0), fMag|icFailID|
|00000600| 28 6b 4d 61 67 69 63 46 | 61 69 6c 49 44 29 20 7b |(kMagicF|ailID) {|
|00000610| 7d 3b 0d 09 42 6f 6f 6c | 65 61 6e 09 09 09 09 09 |};..Bool|ean.....|
|00000620| 53 65 74 75 70 28 29 3b | 0d 09 76 6f 69 64 09 09 |Setup();|..void..|
|00000630| 09 09 09 54 65 61 72 44 | 6f 77 6e 28 29 3b 0d 09 |...TearD|own();..|
|00000640| 42 6f 6f 6c 65 61 6e 09 | 09 09 09 09 42 65 67 69 |Boolean.|....Begi|
|00000650| 6e 54 72 79 28 29 3b 0d | 09 4f 53 45 72 72 09 09 |nTry();.|.OSErr..|
|00000660| 09 09 09 45 78 63 65 70 | 74 69 6f 6e 45 72 72 6f |...Excep|tionErro|
|00000670| 72 28 29 09 09 7b 20 72 | 65 74 75 72 6e 20 66 45 |r()..{ r|eturn fE|
|00000680| 72 72 6f 72 3b 20 7d 3b | 0d 7d 3b 0d 0d 2f 2f 0d |rror; };|.};..//.|
|00000690| 2f 2f 20 20 74 72 79 20 | 2f 20 63 61 74 63 68 20 |// try |/ catch |
|000006a0| 6d 61 63 72 6f 73 0d 2f | 2f 0d 2f 2f 09 46 6f 72 |macros./|/.//.For|
|000006b0| 6d 65 72 6c 79 2c 20 49 | 20 75 73 65 64 20 74 68 |merly, I| used th|
|000006c0| 65 20 72 65 73 75 6c 74 | 20 6f 66 20 73 65 74 6a |e result| of setj|
|000006d0| 6d 70 20 74 6f 20 73 65 | 74 20 73 74 61 74 75 73 |mp to se|t status|
|000006e0| 20 62 69 74 73 3b 0d 2f | 2f 09 68 6f 77 65 76 65 | bits;./|/.howeve|
|000006f0| 72 2c 20 74 68 61 74 27 | 73 20 6e 6f 74 20 77 6f |r, that'|s not wo|
|00000700| 72 6b 69 6e 67 20 69 6e | 20 4d 65 74 72 6f 57 65 |rking in| MetroWe|
|00000710| 72 6b 73 2e 20 20 4d 79 | 20 67 75 65 73 73 20 69 |rks. My| guess i|
|00000720| 73 20 74 68 61 74 0d 2f | 2f 09 74 68 65 72 65 20 |s that./|/.there |
|00000730| 69 73 20 73 6f 6d 65 20 | 63 6f 6e 66 75 73 69 6f |is some |confusio|
|00000740| 6e 20 6f 76 65 72 20 73 | 69 7a 65 6f 66 28 69 6e |n over s|izeof(in|
|00000750| 74 29 2c 20 62 75 74 20 | 49 27 6d 20 6e 6f 74 20 |t), but |I'm not |
|00000760| 73 75 72 65 2e 0d 2f 2f | 09 54 68 65 72 65 66 6f |sure..//|.Therefo|
|00000770| 72 65 2c 20 49 27 6d 20 | 6a 75 73 74 20 67 6f 69 |re, I'm |just goi|
|00000780| 6e 67 20 74 6f 20 61 73 | 73 75 6d 65 20 74 68 61 |ng to as|sume tha|
|00000790| 74 20 74 68 65 20 73 65 | 63 6f 6e 64 20 74 69 6d |t the se|cond tim|
|000007a0| 65 0d 2f 2f 09 66 69 2e | 53 65 74 75 70 20 65 78 |e.//.fi.|Setup ex|
|000007b0| 65 63 75 74 65 73 2c 20 | 77 65 27 72 65 20 66 61 |ecutes, |we're fa|
|000007c0| 69 6c 69 6e 67 2e 0d 2f | 2f 0d 23 64 65 66 69 6e |iling../|/.#defin|
|000007d0| 65 20 54 72 79 09 09 09 | 54 45 78 63 65 70 74 69 |e Try...|TExcepti|
|000007e0| 6f 6e 20 66 69 3b 20 73 | 65 74 6a 6d 70 28 66 69 |on fi; s|etjmp(fi|
|000007f0| 2e 66 45 6e 76 29 3b 20 | 69 66 28 66 69 2e 53 65 |.fEnv); |if(fi.Se|
|00000800| 74 75 70 28 29 29 20 77 | 68 69 6c 65 28 66 69 2e |tup()) w|hile(fi.|
|00000810| 42 65 67 69 6e 54 72 79 | 28 29 29 0d 23 64 65 66 |BeginTry|()).#def|
|00000820| 69 6e 65 20 43 61 74 63 | 68 28 65 72 72 29 09 65 |ine Catc|h(err).e|
|00000830| 6c 73 65 20 69 66 28 28 | 65 72 72 20 3d 20 66 69 |lse if((|err = fi|
|00000840| 2e 45 78 63 65 70 74 69 | 6f 6e 45 72 72 6f 72 28 |.Excepti|onError(|
|00000850| 29 29 20 21 3d 20 6e 6f | 45 72 72 29 0d 0d 2f 2f |)) != no|Err)..//|
|00000860| 0d 2f 2f 20 47 6c 6f 62 | 61 6c 73 3a 0d 2f 2f 0d |.// Glob|als:.//.|
|00000870| 65 78 74 65 72 6e 20 54 | 45 78 63 65 70 74 69 6f |extern T|Exceptio|
|00000880| 6e 2a 09 09 09 67 45 78 | 63 65 70 74 69 6f 6e 53 |n*...gEx|ceptionS|
|00000890| 74 61 63 6b 3b 0d 0d 2f | 2f 0d 2f 2f 20 50 72 6f |tack;../|/.// Pro|
|000008a0| 74 6f 74 79 70 65 73 0d | 2f 2f 0d 76 6f 69 64 09 |totypes.|//.void.|
|000008b0| 09 09 09 09 09 54 68 72 | 6f 77 28 4f 53 45 72 72 |.....Thr|ow(OSErr|
|000008c0| 20 74 68 65 45 72 72 29 | 3b 0d 0d 23 65 6c 73 65 | theErr)|;..#else|
|000008d0| 09 2f 2f 20 52 45 41 4c | 5f 45 58 43 45 50 54 49 |.// REAL|_EXCEPTI|
|000008e0| 4f 4e 53 0d 0d 23 64 65 | 66 69 6e 65 20 54 72 79 |ONS..#de|fine Try|
|000008f0| 09 09 09 74 72 79 0d 23 | 64 65 66 69 6e 65 20 43 |...try.#|define C|
|00000900| 61 74 63 68 28 65 72 72 | 29 09 63 61 74 63 68 28 |atch(err|).catch(|
|00000910| 4f 53 45 72 72 20 65 72 | 72 29 0d 23 64 65 66 69 |OSErr er|r).#defi|
|00000920| 6e 65 20 54 68 72 6f 77 | 09 09 74 68 72 6f 77 0d |ne Throw|..throw.|
|00000930| 0d 23 65 6e 64 69 66 09 | 2f 2f 20 52 45 41 4c 5f |.#endif.|// REAL_|
|00000940| 45 58 43 45 50 54 49 4f | 4e 53 0d 0d 74 79 70 65 |EXCEPTIO|NS..type|
|00000950| 64 65 66 20 76 6f 69 64 | 20 28 2a 4e 6f 74 69 66 |def void| (*Notif|
|00000960| 79 46 61 69 6c 75 72 65 | 50 72 6f 63 29 28 4f 53 |yFailure|Proc)(OS|
|00000970| 45 72 72 20 65 72 72 29 | 3b 0d 0d 76 6f 69 64 09 |Err err)|;..void.|
|00000980| 09 09 09 09 09 53 65 74 | 45 78 63 65 70 74 69 6f |.....Set|Exceptio|
|00000990| 6e 4e 6f 74 69 66 79 50 | 72 6f 63 28 4e 6f 74 69 |nNotifyP|roc(Noti|
|000009a0| 66 79 46 61 69 6c 75 72 | 65 50 72 6f 63 20 6e 6f |fyFailur|eProc no|
|000009b0| 74 69 66 79 50 72 6f 63 | 29 3b 0d 42 6f 6f 6c 65 |tifyProc|);.Boole|
|000009c0| 61 6e 09 09 09 09 09 09 | 45 78 63 65 70 74 69 6f |an......|Exceptio|
|000009d0| 6e 4e 6f 74 69 66 79 50 | 72 6f 63 49 6e 73 74 61 |nNotifyP|rocInsta|
|000009e0| 6c 6c 65 64 28 76 6f 69 | 64 29 3b 0d 76 6f 69 64 |lled(voi|d);.void|
|000009f0| 09 09 09 09 09 09 4e 6f | 74 69 66 79 46 61 69 6c |......No|tifyFail|
|00000a00| 75 72 65 28 4f 53 45 72 | 72 20 65 72 72 29 3b 0d |ure(OSEr|r err);.|
|00000a10| 0d 76 6f 69 64 09 09 09 | 09 09 09 4d 61 6b 65 56 |.void...|...MakeV|
|00000a20| 61 72 69 61 62 6c 65 4e | 6f 52 65 67 69 73 74 65 |ariableN|oRegiste|
|00000a30| 72 28 20 76 6f 69 64 2a | 20 66 6f 6f 20 29 3b 0d |r( void*| foo );.|
|00000a40| 0d 2f 2f 0d 2f 2f 20 54 | 68 69 73 20 6d 61 63 72 |.//.// T|his macr|
|00000a50| 6f 20 72 65 66 65 72 65 | 6e 63 65 73 20 74 68 65 |o refere|nces the|
|00000a60| 20 61 64 64 72 65 73 73 | 20 6f 66 20 74 68 65 20 | address| of the |
|00000a70| 73 70 65 63 69 66 69 65 | 64 20 6c 6f 63 61 6c 0d |specifie|d local.|
|00000a80| 2f 2f 20 76 61 72 69 61 | 62 6c 65 3b 20 74 68 69 |// varia|ble; thi|
|00000a90| 73 20 77 69 6c 6c 20 70 | 72 65 76 65 6e 74 20 74 |s will p|revent t|
|00000aa0| 68 65 20 63 6f 6d 70 69 | 6c 65 72 20 66 72 6f 6d |he compi|ler from|
|00000ab0| 20 75 73 69 6e 67 20 74 | 68 65 0d 2f 2f 20 76 61 | using t|he.// va|
|00000ac0| 72 69 61 62 6c 65 20 61 | 73 20 61 20 72 65 67 69 |riable a|s a regi|
|00000ad0| 73 74 65 72 20 76 61 72 | 69 61 62 6c 65 2e 0d 2f |ster var|iable../|
|00000ae0| 2f 0d 23 64 65 66 69 6e | 65 20 4e 4f 52 45 47 49 |/.#defin|e NOREGI|
|00000af0| 53 54 45 52 28 78 29 09 | 09 28 20 4d 61 6b 65 56 |STER(x).|.( MakeV|
|00000b00| 61 72 69 61 62 6c 65 4e | 6f 52 65 67 69 73 74 65 |ariableN|oRegiste|
|00000b10| 72 28 20 28 76 6f 69 64 | 2a 29 28 26 28 78 29 29 |r( (void|*)(&(x))|
|00000b20| 20 29 20 29 0d 0d 2f 2f | 0d 2f 2f 09 43 6f 6e 76 | ) )..//|.//.Conv|
|00000b30| 65 6e 69 65 6e 63 65 20 | 66 75 6e 63 74 69 6f 6e |enience |function|
|00000b40| 73 0d 2f 2f 0d 69 6e 6c | 69 6e 65 20 76 6f 69 64 |s.//.inl|ine void|
|00000b50| 20 46 61 69 6c 28 29 09 | 09 09 09 09 09 09 7b 20 | Fail().|......{ |
|00000b60| 54 68 72 6f 77 28 65 47 | 65 6e 65 72 61 6c 45 72 |Throw(eG|eneralEr|
|00000b70| 72 29 3b 20 7d 0d 69 6e | 6c 69 6e 65 20 76 6f 69 |r); }.in|line voi|
|00000b80| 64 20 46 61 69 6c 45 72 | 72 28 4f 53 45 72 72 20 |d FailEr|r(OSErr |
|00000b90| 74 68 65 45 72 72 29 09 | 09 09 7b 20 69 66 28 74 |theErr).|..{ if(t|
|00000ba0| 68 65 45 72 72 20 21 3d | 20 6e 6f 45 72 72 29 20 |heErr !=| noErr) |
|00000bb0| 54 68 72 6f 77 28 74 68 | 65 45 72 72 29 3b 20 7d |Throw(th|eErr); }|
|00000bc0| 0d 69 6e 6c 69 6e 65 20 | 76 6f 69 64 20 46 61 69 |.inline |void Fai|
|00000bd0| 6c 4f 53 45 72 72 28 4f | 53 45 72 72 20 74 68 65 |lOSErr(O|SErr the|
|00000be0| 45 72 72 29 09 09 09 7b | 20 46 61 69 6c 45 72 72 |Err)...{| FailErr|
|00000bf0| 28 74 68 65 45 72 72 29 | 3b 20 7d 0d 69 6e 6c 69 |(theErr)|; }.inli|
|00000c00| 6e 65 20 76 6f 69 64 20 | 46 61 69 6c 52 65 73 45 |ne void |FailResE|
|00000c10| 72 72 6f 72 28 29 09 09 | 09 09 09 7b 20 46 61 69 |rror()..|...{ Fai|
|00000c20| 6c 45 72 72 28 52 65 73 | 45 72 72 6f 72 28 29 29 |lErr(Res|Error())|
|00000c30| 3b 20 7d 0d 69 6e 6c 69 | 6e 65 20 76 6f 69 64 20 |; }.inli|ne void |
|00000c40| 46 61 69 6c 4d 65 6d 45 | 72 72 6f 72 28 29 09 09 |FailMemE|rror()..|
|00000c50| 09 09 09 7b 20 46 61 69 | 6c 45 72 72 28 4d 65 6d |...{ Fai|lErr(Mem|
|00000c60| 45 72 72 6f 72 28 29 29 | 3b 20 7d 0d 69 6e 6c 69 |Error())|; }.inli|
|00000c70| 6e 65 20 76 6f 69 64 20 | 46 61 69 6c 4e 69 6c 28 |ne void |FailNil(|
|00000c80| 76 6f 69 64 2a 20 70 74 | 72 29 09 09 09 09 7b 20 |void* pt|r)....{ |
|00000c90| 69 66 28 70 74 72 20 3d | 3d 20 6e 69 6c 29 20 54 |if(ptr =|= nil) T|
|00000ca0| 68 72 6f 77 28 65 50 6f | 69 6e 74 65 72 4e 69 6c |hrow(ePo|interNil|
|00000cb0| 29 3b 20 7d 0d 69 6e 6c | 69 6e 65 20 76 6f 69 64 |); }.inl|ine void|
|00000cc0| 20 46 61 69 6c 4e 49 4c | 28 76 6f 69 64 2a 20 70 | FailNIL|(void* p|
|00000cd0| 74 72 29 09 09 09 09 7b | 20 46 61 69 6c 4e 69 6c |tr)....{| FailNil|
|00000ce0| 28 70 74 72 29 3b 20 7d | 0d 69 6e 6c 69 6e 65 20 |(ptr); }|.inline |
|00000cf0| 76 6f 69 64 20 46 61 69 | 6c 52 65 73 45 72 72 6f |void Fai|lResErro|
|00000d00| 72 4f 72 4e 69 6c 28 76 | 6f 69 64 2a 20 70 74 72 |rOrNil(v|oid* ptr|
|00000d10| 29 09 7b 20 46 61 69 6c | 52 65 73 45 72 72 6f 72 |).{ Fail|ResError|
|00000d20| 28 29 3b 20 46 61 69 6c | 4e 69 6c 28 70 74 72 29 |(); Fail|Nil(ptr)|
|00000d30| 3b 20 7d 0d 69 6e 6c 69 | 6e 65 20 76 6f 69 64 20 |; }.inli|ne void |
|00000d40| 46 61 69 6c 4d 65 6d 45 | 72 72 6f 72 4f 72 4e 69 |FailMemE|rrorOrNi|
|00000d50| 6c 28 76 6f 69 64 2a 20 | 70 74 72 29 09 7b 20 46 |l(void* |ptr).{ F|
|00000d60| 61 69 6c 4d 65 6d 45 72 | 72 6f 72 28 29 3b 20 46 |ailMemEr|ror(); F|
|00000d70| 61 69 6c 4e 69 6c 28 70 | 74 72 29 3b 20 7d 0d 0d |ailNil(p|tr); }..|
|00000d80| 2f 2f 0d 2f 2f 20 52 65 | 71 75 69 72 65 6d 65 6e |//.// Re|quiremen|
|00000d90| 74 73 0d 2f 2f 0d 69 6e | 6c 69 6e 65 20 76 6f 69 |ts.//.in|line voi|
|00000da0| 64 20 52 65 71 75 69 72 | 65 28 42 6f 6f 6c 65 61 |d Requir|e(Boolea|
|00000db0| 6e 20 74 72 75 74 68 29 | 09 09 09 7b 20 69 66 28 |n truth)|...{ if(|
|00000dc0| 20 21 28 74 72 75 74 68 | 29 20 29 20 54 68 72 6f | !(truth|) ) Thro|
|00000dd0| 77 28 65 52 65 71 75 69 | 72 65 6d 65 6e 74 4e 6f |w(eRequi|rementNo|
|00000de0| 74 4d 65 74 29 3b 20 7d | 0d 69 6e 6c 69 6e 65 20 |tMet); }|.inline |
|00000df0| 76 6f 69 64 20 52 65 71 | 75 69 72 65 50 74 72 56 |void Req|uirePtrV|
|00000e00| 61 6c 69 64 28 76 6f 69 | 64 2a 20 70 29 09 09 7b |alid(voi|d* p)..{|
|00000e10| 20 69 66 28 20 28 70 20 | 3d 3d 20 6e 69 6c 29 20 | if( (p |== nil) |
|00000e20| 7c 7c 20 28 28 28 6c 6f | 6e 67 29 28 70 29 20 26 ||| (((lo|ng)(p) &|
|00000e30| 20 31 29 20 21 3d 20 30 | 29 20 29 20 54 68 72 6f | 1) != 0|) ) Thro|
|00000e40| 77 28 65 52 65 71 75 69 | 72 65 6d 65 6e 74 4e 6f |w(eRequi|rementNo|
|00000e50| 74 4d 65 74 29 3b 20 7d | 0d 69 6e 6c 69 6e 65 20 |tMet); }|.inline |
|00000e60| 76 6f 69 64 20 52 65 71 | 75 69 72 65 48 61 6e 64 |void Req|uireHand|
|00000e70| 6c 65 56 61 6c 69 64 28 | 48 61 6e 64 6c 65 20 68 |leValid(|Handle h|
|00000e80| 29 09 7b 20 52 65 71 75 | 69 72 65 50 74 72 56 61 |).{ Requ|irePtrVa|
|00000e90| 6c 69 64 28 28 76 6f 69 | 64 2a 29 28 68 29 29 3b |lid((voi|d*)(h));|
|00000ea0| 20 52 65 71 75 69 72 65 | 50 74 72 56 61 6c 69 64 | Require|PtrValid|
|00000eb0| 28 28 76 6f 69 64 2a 29 | 28 2a 68 29 29 3b 20 7d |((void*)|(*h)); }|
|00000ec0| 0d 0d 2f 2f 0d 2f 2f 20 | 52 65 71 75 69 72 65 6d |..//.// |Requirem|
|00000ed0| 65 6e 74 73 20 6d 75 73 | 74 20 61 6c 77 61 79 73 |ents mus|t always|
|00000ee0| 20 62 65 20 6d 65 74 2c | 20 62 75 74 20 41 73 73 | be met,| but Ass|
|00000ef0| 65 72 74 69 6f 6e 73 20 | 63 61 6e 20 62 65 20 72 |ertions |can be r|
|00000f00| 65 6d 6f 76 65 64 20 69 | 6e 20 6e 6f 6e 2d 64 65 |emoved i|n non-de|
|00000f10| 62 75 67 20 62 75 69 6c | 64 73 0d 2f 2f 20 61 73 |bug buil|ds.// as|
|00000f20| 20 74 68 65 79 20 61 72 | 65 20 73 74 61 74 65 6d | they ar|e statem|
|00000f30| 65 6e 74 73 20 74 68 61 | 74 20 61 72 65 20 41 53 |ents tha|t are AS|
|00000f40| 53 55 4d 45 44 20 74 6f | 20 61 6c 77 61 79 73 20 |SUMED to| always |
|00000f50| 62 65 20 74 72 75 65 0d | 2f 2f 0d 69 6e 6c 69 6e |be true.|//.inlin|
|00000f60| 65 20 76 6f 69 64 20 41 | 73 73 65 72 74 28 42 6f |e void A|ssert(Bo|
|00000f70| 6f 6c 65 61 6e 20 74 72 | 75 74 68 29 09 09 09 7b |olean tr|uth)...{|
|00000f80| 20 69 66 28 20 21 28 74 | 72 75 74 68 29 20 29 20 | if( !(t|ruth) ) |
|00000f90| 54 68 72 6f 77 28 65 41 | 73 73 65 72 74 69 6f 6e |Throw(eA|ssertion|
|00000fa0| 46 61 69 6c 75 72 65 29 | 3b 20 7d 0d 69 6e 6c 69 |Failure)|; }.inli|
|00000fb0| 6e 65 20 76 6f 69 64 20 | 41 73 73 65 72 74 50 74 |ne void |AssertPt|
|00000fc0| 72 56 61 6c 69 64 28 76 | 6f 69 64 2a 20 70 29 09 |rValid(v|oid* p).|
|00000fd0| 09 09 7b 20 69 66 28 20 | 28 70 20 3d 3d 20 6e 69 |..{ if( |(p == ni|
|00000fe0| 6c 29 20 7c 7c 20 28 28 | 28 6c 6f 6e 67 29 28 70 |l) || ((|(long)(p|
|00000ff0| 29 20 26 20 31 29 20 21 | 3d 20 30 29 20 29 20 54 |) & 1) !|= 0) ) T|
|00001000| 68 72 6f 77 28 65 41 73 | 73 65 72 74 69 6f 6e 46 |hrow(eAs|sertionF|
|00001010| 61 69 6c 75 72 65 29 3b | 20 7d 0d 69 6e 6c 69 6e |ailure);| }.inlin|
|00001020| 65 20 76 6f 69 64 20 41 | 73 73 65 72 74 48 61 6e |e void A|ssertHan|
|00001030| 64 6c 65 56 61 6c 69 64 | 28 76 6f 69 64 2a 2a 20 |dleValid|(void** |
|00001040| 68 29 09 09 7b 20 41 73 | 73 65 72 74 50 74 72 56 |h)..{ As|sertPtrV|
|00001050| 61 6c 69 64 28 28 76 6f | 69 64 2a 29 68 29 3b 20 |alid((vo|id*)h); |
|00001060| 41 73 73 65 72 74 50 74 | 72 56 61 6c 69 64 28 2a |AssertPt|rValid(*|
|00001070| 68 29 3b 20 7d 0d 0d 23 | 64 65 66 69 6e 65 20 41 |h); }..#|define A|
|00001080| 53 53 45 52 54 28 78 29 | 20 41 73 73 65 72 74 28 |SSERT(x)| Assert(|
|00001090| 78 29 0d 23 64 65 66 69 | 6e 65 20 52 45 51 55 49 |x).#defi|ne REQUI|
|000010a0| 52 45 28 78 29 20 52 65 | 71 75 69 72 65 28 78 29 |RE(x) Re|quire(x)|
|000010b0| 0d 0d 23 65 6e 64 69 66 | 0d 00 00 00 00 00 00 00 |..#endif|........|
|000010c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001100| 00 00 01 00 00 00 01 76 | 00 00 00 76 00 00 00 52 |.......v|...v...R|
|00001110| 20 64 65 6c 65 74 65 20 | 74 68 65 20 73 65 6c 65 | delete |the sele|
|00001120| 63 74 65 64 20 69 74 65 | 6d 28 73 29 3f 00 00 00 |cted ite|m(s)?...|
|00001130| 0c 45 78 63 65 70 74 69 | 6f 6e 73 2e 68 0f 02 00 |.Excepti|ons.h...|
|00001140| 00 00 54 45 58 54 4d 4d | 43 43 01 00 ff ff ff ff |..TEXTMM|CC......|
|00001150| 00 00 54 45 58 54 4d 4d | 43 43 01 00 ff ff ff ff |..TEXTMM|CC......|
|00001160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001170| 00 00 a7 ba eb 62 00 00 | 10 39 00 00 01 c8 00 02 |.....b..|.9......|
|00001180| 01 00 01 e5 80 00 00 00 | 00 00 01 08 00 19 01 1c |........|........|
|00001190| 00 55 04 05 43 6c 65 61 | 72 00 00 00 00 64 00 04 |.U..Clea|r....d..|
|000011a0| 00 00 00 00 00 ed 00 0a | 01 01 00 46 04 02 4f 4b |........|...F..OK|
|000011b0| 00 00 00 00 00 ec 00 82 | 01 00 00 be 04 06 43 61 |........|......Ca|
|000011c0| 6e 63 65 6c 00 00 00 00 | 00 20 00 0a 00 e0 00 be |ncel....|. ......|
|000011d0| 00 00 00 00 00 00 00 04 | 00 0a 00 14 00 be 88 13 |........|........|
|000011e0| 53 65 6c 65 63 74 20 66 | 6f 72 6d 20 74 6f 20 75 |Select f|orm to u|
|000011f0| 73 65 3a 00 00 00 00 00 | 00 ed 00 0a 01 01 00 46 |se:.....|.......F|
|00001200| 00 00 00 1e 00 2b 00 04 | 01 8a 02 6e 00 2b 00 04 |.....+..|...n.+..|
|00001210| 01 8a 02 6e 00 00 04 a2 | 00 00 00 00 00 00 00 00 |...n....|........|
|00001220| 00 00 00 00 00 48 00 09 | 4d 6f 6e 61 63 6f 00 00 |.....H..|Monaco..|
|00001230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001240| 00 00 00 00 00 00 00 00 | 00 03 00 04 00 6b 00 38 |........|.....k.8|
|00001250| 01 ca 02 69 00 6b 00 38 | 01 ca 02 69 ac cf fc 1f |...i.k.8|...i....|
|00001260| 00 00 09 c0 00 00 09 c0 | 00 00 00 00 01 00 00 00 |........|........|
|00001270| 00 04 00 01 00 01 00 00 | 01 00 00 00 01 76 00 00 |........|.....v..|
|00001280| 00 76 00 00 00 52 00 dd | 45 88 0c dc 00 00 00 1c |.v...R..|E.......|
|00001290| 00 52 00 01 4d 50 53 52 | 00 01 00 12 4d 57 42 42 |.R..MPSR|....MWBB|
|000012a0| 00 00 00 2a 03 f0 ff ff | 00 00 00 00 00 00 00 00 |...*....|........|
|000012b0| 03 ed ff ff 00 00 00 22 | 00 00 00 00 03 f0 ff ff |......."|........|
|000012c0| 00 00 00 6e 00 00 00 00 | 00 00 00 00 00 00 00 00 |...n....|........|
|000012d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+